package com.frost.demo.ioc.service;

import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

@Service
public class UserService {
    public void sayHi() {
        System.out.println("hi, UserService");
    }

    public static void main2(String[] args) {
        long timestamp = 1730967284875L;
        Date date = new Date(timestamp);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String formattedDate = sdf.format(date);
        System.out.println("Formatted Date: " + formattedDate);
    }

    public static void main1(String[] args) {
        Map<String, Object> attriParms = new HashMap<>();
        attriParms.put("111", "aaa");
        attriParms.put("222", "bbb");
        attriParms.put("333", "ccc");
        Iterator var7 = attriParms.entrySet().iterator();
        while (var7.hasNext()) {
            Map.Entry<String, Object> entry = (Map.Entry<String, Object>) var7.next();
            if ("333".equals(entry.getKey()) && !StringUtils.isEmpty((String) entry.getValue())) {
                System.out.println("okk: " + entry.getKey());
            }
        }

    }
}
